package org.siscoh.model.dao;

import java.sql.ResultSet;
import java.util.ArrayList;
import org.siscoh.model.bean.AbstractBean;

/**
*/
public abstract class AbstractDao {
/**
*/
protected Conexao conexao;
/**
 * @param bean 
*/
public abstract void update(AbstractBean bean);
/**
 * @param bean 
*/
public abstract void insert(AbstractBean bean);

/**
 * @param bean 
*/
public abstract void delete(AbstractBean bean);

public abstract ArrayList<?> fetchAllArrayList();

public abstract AbstractBean[] fetchAll();

public abstract AbstractBean selectById(long id);

protected abstract AbstractBean parseRsToObject(ResultSet rs);

protected abstract ArrayList<?> parseRsToObjects(ResultSet rs);

protected ArrayList<String> createSingleAL(String s)    {
    ArrayList<String> al = new ArrayList<String>();
    al.add(s);
    return al;
}

}

